<?php
#string number_format ( float $price [, int $decimals = 0 ] )

$price = 123456789.87654;
echo number_format($price,3);
//123,456,789.88

// If you don't like above output and you want to make seperator custom
echo "\n\n";
//string number_format
//( float $price , int $decimals = 0 ,
//string $decimal_seperator = '.' ,
//string $thousands_sep = ',' )
echo number_format($price, 3, ',' ,' ');
echo "\n\n";
